/*
 * @Author: ✨Fireflx 
 * @Date: 2022-02-14 17:58:11 
 * @Last Modified by:   ✨Fireflx 
 * @Last Modified time: 2022-02-14 17:58:11 
 */


const resCallback = ({
    code = false,
    res,
    ctx,
    hasData = false,
    msg
})=>{
    ctx.body = code ?
    {
        code: 200,
        msg: msg+'成功！',
        data:hasData?res:null
    } : {
        code: 400,
        msg: msg+'异常！'
    }
}

module.exports = resCallback;